package com.hqq.presentation_tier.flux.view;

import com.hqq.presentation_tier.flux.action.MenuItem;
import com.hqq.presentation_tier.flux.store.Store;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * MenuView
 * Created by heqianqian on 2017/8/17.
 */
public class MenuView implements View {

    private static final Logger LOGGER = LoggerFactory.getLogger(MenuView.class);

    private MenuItem selected = MenuItem.HOME;

    @Override
    public void storeChanged(Store store) {

    }

    @Override
    public void render() {
        for (MenuItem item : MenuItem.values()) {
            if (selected.equals(item)) {
                LOGGER.info("* {}", item);
            } else {
                LOGGER.info(item.toString());
            }
        }
    }

    public void itemClicked(MenuItem menuItem){

    }
}
